<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>TestCase Task</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
</head>

<body>

<h2>TestCase</h2>
<h3>Description</h3>
<p>TestCase is a container task that may contain any other Ant Task. It forms the 
logical unit of a single test and usually contains a set of <a href="remoteexec.html">RemoteExec</a>, <a href="remotejava.html">RemoteJava</a>, <a href="shutdownexec.html">ShutdownExec</a>, <a href="shutdownjava.html">ShutdownJava</a> Tasks. </p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>

    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">name</td>
    <td valign="top">The name of the TestCase. Used for Result logging.</td>
    <td align="center" valign="middle">No (*)</td>
  </tr>
</table>
<p>
(*) If no name is specified, the default name is "default test case". <br/>
</p>

<h3>Example</h3>
<pre>&lt;testcase name=&quot;foo_test&quot;&gt;
  &lt;echo message=&quot;starting the java test server&quot;/&gt;
  &lt;remotejava classname=&quot;test.Server&quot; hostref=&quot;greatwall&quot;&gt;
    &lt;classpath refid=&quot;classpath&quot;/&gt;		
    &lt;expect file=&quot;server.ior&quot;/&gt;
  &lt;/remotejava&gt;
	
  &lt;echo message=&quot;starting the cxx test client&quot;/&gt;
  &lt;remoteexec dir=&quot;/tmp&quot; executable=&quot;cxx.client&quot; hostref=&quot;localhost&quot;&gt;
    &lt;arg line=&quot;-Host ${greatwall}&quot;&gt;
  &lt;/remoteexec&gt;

  &lt;shutdownjava classname=&quot;test.Server&quot; hostref=&quot;greatwall&quot;&gt;
    &lt;classpath refid=&quot;classpath&quot;/&gt;		
  &lt;/shutdownjava&gt;
&lt;/testcase&gt;
</pre>
<p>This test does the following in order:
<ul>
<li>Echo the java test server is going to start</li>
<li>Execute the test.Server class on <strong>greatwall</strong>. the java server will generate the server.ior file, check if teh file exist. </li>
<li>Echo<code> the c++ test client is goint to start. </code></li>
<li>Execute the c++ test client on <strong>localhost</strong>.
<li>After the client is finished, shutdown the java test server on greatwall.</li>
</ul>
If any of the above steps fails, subsequent processes are not executed and the 
TestCase is marked "Failed".
</p>

<hr>
<p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>
</body>
</html>
